# This is a sample Python script.

# Press ⌃R to execute it or replace it with your code.
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.

import requests
from bs4 import BeautifulSoup

# Press the green button in the gutter to run the script.
# if __name__ == '__main__':
#     page = requests.get('https://fangshixiang.blog.csdn.net/category_7941357_4.html')
#     html = page.text
#     soup = BeautifulSoup(html, features="html.parser")
#     ul_item = soup.find("ul", class_="column_article_list")
#     li_list = ul_item.find_all(name="li")
#     for i in range(0, len(li_list)):
#         li_ele = li_list[i]
#         link = li_ele.select("a")[0]['href'].replace("\n", "").strip()
#         title = li_ele.select("div h2")[0].get_text().replace("\n", "").strip()
#         content = "[" + title + "](" + link + ")"
#         print(content)
#         # print(title, link, sep=': ')

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
